#ifndef SPRITEBOX_H
#define SPRITEBOX_H

#include <Fl/Fl_Button.h>
#include <Fl/Fl.h>
#include <Fl/Fl_PNG_Image.h>
#include <iostream>


class spriteBox : public Fl_Button
{
    public:
        spriteBox(int x,int y,int imagewidth,int imageheight,int psectionwidth,int psectionheight,const char *filename,bool pautoanim=true);
        spriteBox(int x,int y,int w,int h,const char *filename);
        spriteBox(int x,int y,int w,int h);
        void section(int pcx,int pcy);
        virtual ~spriteBox();

        void settimer(double panimtime);
        void setrow(int prow);
        void setcolumn(int pcolumn);
        void setsection(int psectionwidth,int psectionheigth);
        double gettime();
        void animationstate(bool panim);
        void spriteposition(int pcx,int pcy);
        bool animationstate();
        static void anim_CB(void *userdata);
        virtual std::string tipgonder()=0;
        void anim_CB2();
    protected:
        void draw();
        Fl_PNG_Image *resim;
        int sectionwidth;
        int sectionheight;
        int row;
        int column;
        bool autoanim;
        int cx;
        int cy;
        double animtime;
    private:

};

#endif // SPRITEBOX_H
